<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class AddColTakeGoodsTimeToGoodsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        if (!Schema::hasColumn('goods', 'take_goods_time')) {
            Schema::table('goods', function(Blueprint $table) {
                $table->integer('take_goods_time')->default(0)->comment('取货时间（小时）0为不限制')->after('link_url');
            });
        }

    }


    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
